package day15_tasks;

public class A_Test {
    public static void main(String[] args) {
        //创建长方形的对象
        A_Rectangle rec = new A_Rectangle();

        //为相应的属性赋值
        rec.setLength(3);
        rec.setWidth(2);

        //求面积
        System.out.println(rec.S());//6
        //求周长
        System.out.println(rec.C());//10

        System.out.println("--------------------------");

        //创建圆形的对象
        A_Round rou = new A_Round();

        //为相应的属性赋值
        rou.setPi(3.1415926);
        rou.setR(3);

        //求面积
        System.out.println(rou.S());
        //求周长
        System.out.println(rou.C());

    }
}
